package com.deryun.tyl.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;

import com.deryun.tyl.bean.Policy;
import com.deryun.tyl.bean.Publicity;
import com.deryun.tyl.bean.mapper.PublicityMapper;

public class PublicityDaoImpl extends SqlSessionDaoSupport {
	
	@Autowired
	private PublicityMapper publicityMapper;
	
	public int addPublicity(Publicity publicity){
		return publicityMapper.addPublicity(publicity);
	}
	
	public List<Publicity> getAllPublicity(){
		return publicityMapper.getAllPublicity();
	}
	
	public List<Publicity> getUserPublicity(String publishUserId){
		return publicityMapper.getUserPublicity(publishUserId);
	}
	
	public int deletePublicity(int id){
		return publicityMapper.deletePublicity(id);
	}
	
	public int modifyPublicity(Publicity publicity){
		return publicityMapper.modifyPublicity(publicity);
	}
	
	public Publicity getPublicityById(int id){
		return publicityMapper.getPublicityById(id);
	}
	
	public int setResult(Publicity publicity){
		return publicityMapper.setResult(publicity);
	}
}
